import matplotlib.pyplot as plt

x = [2,2,-2,-2,2]
y = [2,-2,-2,2,2]

# 创建绘图
plt.figure()

# 绘制折线
plt.plot(x, y, marker='o')

# 设置坐标轴标签和标题
plt.xlabel('x')
plt.ylabel('y')
plt.title('pily Rectangle points')

# 显示图形线
plt.grid()
plt.show()